<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .container{ 
            width: 500px;
            height: 400px;
            border: 1px solid #000;
        }

        .content{ 
            display: flex;
            justify-content: center;
        
        }
        .left_box{
            width: 100px;
            height: 100px;
            border: 1px solid #000;
        }
        .right_box{
            width: 300px;
            height: 100px;
       
        }
        form {
            display: flex;
            flex-direction: column;
            border: 1px solid #000;
        }
        form button{
            margin: 0 auto;
        }
        
    </style>
</head>
<body>
    <div class="container">
        <div class="content">
            <div class="left_box">123123</div>
            <div class="right_box">
                <form action="#" method="get">
                    <div class="one">  <span>属性名</span> <input type="text" placeholder="属性名"></div>
                    <div class="two"> <span>属性值</span> <input type="text" placeholder="属性值"></div>
                    <button>执行</button>
                </form>
            </div>
        </div>
    </div>

    <script>
        let  ins = document.querySelector('form .one input');
        console.log(ins);
        let  ins1 = document.querySelector('form .two input');
        console.log(ins1);
        let box = document.querySelector('.content .left_box');
        console.log(box);
        let btn = document.querySelector('button')
        console.log(btn);
        
        let l;
        let g;
            ins.onblur = function(){ 
              l= ins.value;  
              console.log(l);
              
            }
            ins1.onblur = function(){ 
              g= ins1.value;  
              console.log(g);  
            }

            btn.onclick = function(){ 
                box.style[l]=g; 
                 
                console.log(1232);
                console.log(l);
                console.log(g);
                
                
            }
            
            
            
       

      
        
    </script>
</body>
</html>